
// src/api/types.ts
export interface Connection {
  id: string;
  name: string;
  uri: string;
  type: 'qemu' | 'lxc' | 'xen';
  status: 'connected' | 'disconnected' | 'connecting';
  is_default: boolean;
  created_at: string;
}

export interface Domain {
  name: string;
  uuid: string;
  state: 'running' | 'paused' | 'shutoff' | 'crashed' | 'suspended';
  vcpus: number;
  memory: number; // MB
  max_memory: number;
  os_type: string;
  autostart: boolean;
}

export interface DomainStats {
  cpu_time: number;
  cpu_usage: number;
  memory_usage: number;
  memory_available: number;
  disk_read_bytes: number;
  disk_write_bytes: number;
  network_rx_bytes: number;
  network_tx_bytes: number;
}

export interface Network {
  name: string;
  uuid: string;
  active: boolean;
  autostart: boolean;
  bridge_name?: string;
  forward_mode?: string;
}

export interface StoragePool {
  name: string;
  uuid: string;
  state: 'active' | 'inactive';
  capacity: number;
  allocation: number;
  available: number;
  type: string;
}

export interface StorageVolume {
  name: string;
  path: string;
  type: string;
  capacity: number;
  allocation: number;
}

export interface ConsoleInfo {
  type: 'serial' | 'vnc' | 'spice';
  host: string;
  port: number;
  password?: string;
  ws_path: string;
}
